Caching Data for DiveTab

The DiveLine server caches all requests made through the Spectre engine. By default, the cache is stored in the dl-dataroot\cache\spectre directory, but this directory can be reconfigured. If you request something once, it is likely that you will request it again; when this happens, the data is cached from your first request and can be retrieved from the cache.

Cache files are named based on their contents, so file names are reused and old files are overridden. However, during periods of active development, you might end up with inaccessible stale entries. In such cases, a nightly sweep may be good practice to remove unused files.

The Spectre cache files are shared by like users, that is, the cache is shared among users with similar access settings. When an application like DiveTab runs and syncs its pages, data is cached on the device. This makes things speedier and available for offline usage. However, DiveTab can be configured so that it has the potential for 10,000 dives that need to be computed and downloaded when synced. It can take two minutes for 60,000 dives to be calculated. Rather than add the calculation time to the data transfer time, you have options to pre-cache the calculations. This way, the data to be synced is already calculated, and the Sync button simply transfers the data.

For offline use, DiveTab downloads cBase and cPlan data locally, and only parts are loaded into memory to service dives. Offline cBases can be up to 400 MB, and dive results up to 200 MB.

There are multiple options for pre-caching Spectre data:

  • The Production node CacheDT (for DiveTab only)
  • The cacheseed.jar program to simulate a DiveTab Sync operation
  • The Production node Spectre Cache Refresh

In addition, certain DiveTab tags can control what is included in the cache:

  • The preload tag for Report and Ad Hoc pages
  • The no-preload tag for Central pages

The preload=true tag determines dives in advance to make tables load faster in the interface. Avoid using preload=true if dive results exceed 200 MB.

See also: